<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
		<title>文件上传</title>
		<link rel="stylesheet" href="/static/web/css/font-awesome.min.css">
		<link rel="stylesheet" href="/static/web/css/bootstrap.min.css">
		<link rel="stylesheet" href="/static/web/css/admin.css">
	</head>
	<body>
		<div class="container-fluid">
			<ol class="breadcrumb">
				<li class="breadcrumb-item"><a href="index_body.php">后台面板</a></li>
				<li class="breadcrumb-item"><a href="file_manage_main.php">文件管理器</a></li>
				<li class="breadcrumb-item active">文件上传</li>
			</ol>
			<div class="card shadow-sm">
				<div class="card-header">文件上传</div>
				<div class="card-body">
					<form method="POST" enctype="multipart/form-data" action="file_manage_control.php" name="form1">
						<input type="hidden" name="activepath" value="{dede:global name='activepath'/}">
						<input type="hidden" name="fmdo" value="upload">
						<div class="table-responsive">
							<table class="table table-borderless">
								<tbody>
									<tr>
										<td width="260">当前目录</td>
										<td>{dede:global name='activepath'/}</td>
									</tr>
									<tr>
										<td colspan="2" id="upfield">
											<p><label>文件1：<input type="file" name="upfile1" class="admin-input-lg"></label></p>
										</td>
									</tr>
									<tr>
										<td  colspan="2" align="center">
											<a class="btn btn-success btn-sm" href="javascript:make_upload();">添加上传</a>
											<button type="submit" class="btn btn-success btn-sm">确定上传</button>
											<a class="btn btn-success btn-sm" href="javascript:reset_upload();">重新上传</button>
										</td>
									</tr>
								</tbody>
							</table>
						</div>
					</form>
				</div>
			</div>
		</div>
		<script>
			var i = 1;
			function make_upload() {
				i++;
				myob = document.getElementById("upfield");
				myob.innerHTML+="<p><label>文件"+i+"：<input type='file' name='upfile"+i+"' class='admin-input-lg'></label></p>";
			}
			function reset_upload() {
				myob = document.getElementById("upfield");
				myob.innerHTML="<p><label>文件1：<input type='file' name='upfile1' class='admin-input-lg'></label></p>";
			}
		</script>
	</body>
</html>